<?php

namespace App\Listeners;

use App\Events\OrderIsPay;
use App\Jobs\OrderNotice;
use App\Tool\NoticeType;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Log;

class OrderIsPaySmsNotification
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  OrderIsPay  $event
     * @return void
     */
    public function handle(OrderIsPay $event)
    {

        //队列发送短信通知
        dispatch(new OrderNotice(NoticeType::order_is_pay_notice,['product'=>$event->orderItem->order_no]));


    }
}
